<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateStoreServicesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('store_services', function (Blueprint $table) {
            $table->id()->comment('客服表');
            $table->integer('merchant_id')->comment('商户ID')->index();
            $table->integer('user_id')->comment('客服ID')->index();
            $table->tinyInteger('online')->default(0)->comment('是否在线 【0：不在线 1：在线】');
            $table->string('account')->comment('账号');
            $table->string('password')->comment('密码');
            $table->string('avatar')->comment('客服头像');
            $table->string('nickname',50)->comment('代理名称');
            $table->char('phone',20)->comment('客服电话');
            $table->tinyInteger('status')->default(0)->comment('状态 0隐藏1显示');
            $table->tinyInteger('order_notify')->default(0)->comment('订单通知1开启0关闭');
            $table->tinyInteger('customer')->default(0)->comment('是否展示统计管理 0 ：否 1：是');
            $table->string('uniqid',35)->comment('');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('store_services');
    }
}
